/...
+import ${basePackage}.dao.system.model.SystemPositionUser;
import ${basePackage}.dao.system.model.SystemUser;
...
+import ${basePackage}.service.system.SystemPositionUserService;
import ${basePackage}.service.system.SystemUserRoleService;
...
public class SystemUserBizImpl implements SystemUserBiz {
+
+    @Autowired
+    private SystemPositionUserService systemPositionUserService;
...
        // 创建用户记录
-         systemUserService.create(systemUser);
+        Integer userId = systemUserService.create(systemUser);
+        // 设置岗位
+        if (systemUser.getPositionIds() != null && systemUser.getPositionIds().size() > 0) {
+            for (Integer positionId : systemUser.getPositionIds()) {
+                SystemPositionUser systemPositionUser = new SystemPositionUser();
+                systemPositionUser.setPositionId(positionId);
+                systemPositionUser.setUserId(userId);
+                systemPositionUser.setOperaUser(systemUser.getCreateUser());
+                systemPositionUser.setOperaTime(new Date());
+                systemPositionUserService.create(systemPositionUser);
+            }
+        }
...
        // 修改用户
        systemUserService.updateById(systemUser);
+        // 设置岗位
+        SystemPositionUser deletePositionDto = new SystemPositionUser();
+        deletePositionDto.setUserId(systemUser.getId());
+        systemPositionUserService.delete(deletePositionDto);
+        if (systemUser.getPositionIds() != null && systemUser.getPositionIds().size() > 0) {
+            for (Integer positionId : systemUser.getPositionIds()) {
+                SystemPositionUser systemPositionUser = new SystemPositionUser();
+                systemPositionUser.setPositionId(positionId);
+                systemPositionUser.setUserId(systemUser.getId());
+                systemPositionUser.setOperaUser(systemUser.getUpdateUser());
+                systemPositionUser.setOperaTime(new Date());
+                systemPositionUserService.create(systemPositionUser);
+            }
+        }
.../